package com.campus.service;

import com.campus.entity.Teacher;
import com.campus.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;
    @Override
    public void insertTeacher(Teacher teacher) {
        teacherMapper.insertTeacher(teacher);
    }
    @Override
    public Teacher selectTeacherById(Integer id){
        return teacherMapper.getTeacherById(id);
    }
    @Override
    public List<Teacher> selectTeacher(Teacher teacher){
       return teacherMapper.selectTeachersByCriteria(teacher);
    }
}
